#set($layout = "blank.html")
<div class="space-4"></div>
<div class="row">
	<div class="col-xs-1"></div>
	<div class="col-xs-10">
		<form id="editForm">
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 登录名: </label>
					<span  class="col-sm-3 control-label no-padding-right" for="form-field-1">$!{obj.data.user.name}</span>	
			</div>
			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 真实姓名:</label>
				
					<span class="col-sm-3 control-label no-padding-right" for="form-field-1">$!{obj.data.user.realName}</span>
			
			</div>
			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right"
					for="form-field-1"> 电话 <small class="text-info">用户电话号码</small></label>
				<div>
					<input class="form-control" type="text" placeholder="请输入电话号码" name="phone" data-type='phone' data-error='请输入正确的电话号码' value="$!{obj.data.user.phone}">
				</div>
			</div>
			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right"
					for="form-field-1"> 邮箱 <small class="text-info">邮箱地址</small></label>
				<div>
					<input class="form-control" type="text" placeholder="请输入邮箱地址" name="email" data-type='email' data-error='请输入正确的邮箱地址' value="$!{obj.data.user.email}">
				</div>
			</div>
			<div class="space-4"></div>
			<div class="space-6"></div>
			<input type="hidden" name="id" value="$!{obj.data.user.id}"/>
			<div class="pull-right" style="margin-right:45px">
				<button type="button" class="btn btn-sm btn-primary" onclick="save()">
					<i class="fa fa-save"></i> 提交
				</button>
				<button class="btn btn-sm btn-warning btn-dialog-undo">
					<i class="fa fa-undo"></i> 返回
				</button>
			</div>
		</form>
	</div>
	<div class="col-xs-1"></div>
</div>
<script type="text/javascript">
function save(){
	var flag=$('input').validation();
	if(flag){
	$.post(getRootPath() + '/user/update', $('#editForm').serialize(), commonAjaxCallBasck, 'json');
	}
}
</script>
